package com.mspbots.core.wise.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mspbots.core.DefaultBaseService;
import com.mspbots.core.wise.model.TenantTimeEntry;
import com.mspbots.core.wise.model.dto.TimeEntryBotReport;
import com.mspbots.cw.request.TenantTimeEntryDTO;

import java.util.List;

/**
 * @author David Yang
 * @date Created by 2019/6/5
 */
public interface TenantTimeEntryService extends DefaultBaseService<TenantTimeEntry> {

    /**
     * get last time entry
     *
     * @param tenant tenant id
     * @return time entry
     */
    TenantTimeEntryDTO lastOne(Long tenant);

    /**
     * find List for rule analysis
     *
     * @param tenUserTimeEntry
     * @return java.util.List<com.mspbots.core.model.TenantUserTimeEntry>
     * @author Jun Zhou
     * @date 12:02 2019/7/8
     **/
    List<TenantTimeEntry> analysisList(TenantTimeEntryDTO tenUserTimeEntry);

    List<TenantTimeEntry> listbyIdAndEntrydate(TenantTimeEntryDTO tenUserTimeEntry);

    List<TenantTimeEntry> listByTenantUser(TenantTimeEntryDTO query);

    TenantTimeEntryDTO findLastOneById(TenantTimeEntryDTO query);

    Integer findByChargeToId(TenantTimeEntry query);

    IPage<TimeEntryBotReport> botReport(Page<TimeEntryBotReport> page, TimeEntryBotReport queryParams);
}
